import request from '@/util/request'

const timeout = 2 * 60 * 1000

export function deleteDeviceSetting(data) {
  return request({
    url: '/iot/device/setting/delete',
    method: 'post',
    data
  })
}

export function deleteDeviceSettingList(data) {
  return request({
    url: '/iot/device/setting/deleteList',
    method: 'post',
    data
  })
}

export function commonGroupByPortDeviceList(data) {
  return request({
    url: '/iot/device/setting/commonGroupByPortList',
    method: 'post',
    data
  })
}

export function sendDeviceSetting(data) {
  return request({
    url: '/iot/device/setting/send',
    method: 'post',
    timeout: timeout,
    data
  })
}

export function listDeviceSetting(data) {
  return request({
    url: '/iot/device/setting/list',
    method: 'post',
    data
  })
}

export function listDeviceSettingIcon(data) {
  return request({
    url: '/iot/device/setting/icon/list',
    method: 'post',
    data
  })
}

export function getDeviceSetting(data) {
  return request({
    url: '/iot/device/setting/get',
    method: 'post',
    data
  })
}

export function updateDeviceSetting(data) {
  return request({
    url: '/iot/device/setting/update',
    method: 'post',
    data
  })
}

export function updateDeviceSettingList(data) {
  return request({
    url: '/iot/device/setting/updateList',
    method: 'post',
    data
  })
}

export function insertDeviceSetting(data) {
  return request({
    url: '/iot/device/setting/insert',
    method: 'post',
    data
  })
}

export function pageGetDeviceSettingValueHistory(data) {
  return request({
    url: '/iot/device/setting/value/history/pageGet',
    method: 'post',
    data
  })
}

